<script>

    layui.use(['form', ], function () {
        var form = layui.form
            , layer = layui.layer


        //表单初始赋值
        let thumbnail = "{{.data.Image}}";
        form.val('detail-form', {
            "resId":{{.data.Id}}
            ,"title": "{{.data.Title}}"
            ,"abs": "{{.data.Abs}}"
            ,"subjectId":"{{.data.SubjectId}}"
            ,"orderNum": "{{.data.OrderNum}}" //开关状态
            ,"bak": "{{.data.Bak}}"
            ,"status": "{{.data.Status}}"
            ,"categoryId": "{{.data.CategoryId}}"
        })
        $("#postCategory").html("{{ .subject.Title }}")
        __editor.setHtml(`{{.data.Content | htmldecode}}`)
        handlerThumbnail(thumbnail)
    });
</script>